﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using Microsoft.Practices.Repository.Oracle;

namespace Microsoft.Practices.Repository.Tests
{
   [TestFixture]
   public class OracleErrorCodesFixture
   {
      
      [Test]
      public void ConcurrencyErrorCodeHasDefault()
      {
         Int32 expectedErrorCode = 20801;
         Int32 actualErrorCode = ErrorCodes.ConcurrencyViolationError;

         Assert.AreEqual(expectedErrorCode, actualErrorCode);   
      }

      [Test]
      public void ConnectIdentifierCannotBeResolvedByTnsHasDefault()
      {
         Int32 expectedErrorCode = 12154;
         Int32 actualErrorCode = ErrorCodes.ConnectIdentifierCannotBeResolvedByTns;

         Assert.AreEqual(expectedErrorCode, actualErrorCode);
      }

      [Test]
      public void InvalidUsernamePasswordHasDefault()
      {
         Int32 expectedErrorCode = 1017;
         Int32 actualErrorCode = ErrorCodes.InvalidUsernamePassword;

         Assert.AreEqual(expectedErrorCode, actualErrorCode);
      }

   }
}
